class WeatherParser():
	def parseCurrentConditions(s):
		dom = parseString(s)
		cu = dom.getElementsByTagName("current_observation")[0]
		timestr = get(cu, "observation_time_rfc822")
		tm = time.strptime(timestr[:-6], "%a, %d %b %Y %H:%M:%S")
		station = get(cu, "station_id")
		temp = get(cu, "temp_c")
		humy = get(cu, "relative_humidity")
		pressure = float(get(cu, "pressure_mb")) * 0.75006
		weather = get(cu, "weather")
		wind_mph = float(get(cu, "wind_mph"))
		wind_dir = get(cu, "wind_dir")
		
		if wind_dir == "North": wind_dir = "N "
		if wind_dir == "South": wind_dir = "S "
		if wind_dir == "West": wind_dir = "W"
		if wind_dir == "East": wind_dir = "E "
		if wind_dir == "Northeast": wind_dir = "NE"
		if wind_dir == "Southeast": wind_dir = "SE"
		if wind_dir == "Southwest": wind_dir = "SW"
		if wind_dir == "Northwest": wind_dir = "NW"
		if wind_dir == "Variable": wind_dir = "Var"

		t = "%s %s: %sC %s%% %.0fmm %.0fmph %s; %s" % (time.strftime("%H:%M", tm), station, temp, humy, pressure, wind_mph, wind_dir, weather)

		return t
